@import 'scss/01-abstracts/variables';
@import 'scss/01-abstracts/mixins';

@keyframes rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.pl-c-loader-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.pl-c-loader-wrapper:not(:last-child) {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.pl-c-loader {
  z-index: 1000;
  position: absolute;
  top: 50%;
  left: 50%;
  margin: auto;
  max-width: $pl-space * 25;
  width: calc(90vw - #{$pl-doublespace});
  border-radius: $pl-border-radius;
  background: rgba($pl-color-black, 0.9);
  transform: translate3d(-50%, -50%, 0px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  opacity: 1;
}

.pl-c-loader__content {
  display: flex;
  align-items: center;
  pointer-events: auto;
}

.pl-c-loader__message {
  flex: 1;
  padding: $pl-space;
  font-size: $pl-font-size-sm-2;
  color: $pl-color-white;
}

.pl-c-loader__spinner {
  position: relative;
  display: inline-block;
  width: $pl-doublespace * 2;
  height: $pl-doublespace;
}

.pl-c-loader-svg:not(:root) {
  overflow: hidden;
}

.pl-c-loader-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: translateZ(0);
  animation: rotate 1s linear infinite;
}

.pl-c-loader-svg__outer-circle {
  fill: none;
  stroke: $pl-color-white;
  stroke-width: 15;
  stroke-miterlimit: 10;
}

.pl-c-loader-svg__inner-circle,
.pl-c-loader-svg__electron {
  fill: $pl-color-gray-20;
}
